using Real = System.Double;

namespace LinearAlgebra.Matrices
{
	/// <summary>
	/// A function that returns a value for a given position in a matrix
	/// Is intentionally vague, it can be used for many things, and thanks to C#
	/// Can in some instances be made context aware, or sequentially aware
	/// Woot for closures!
	/// </summary>
	/// <param name="i">The ith Row</param>
	/// <param name="j">The jth Column</param>
	/// <returns>A value @ Mat[i,j]</returns>
	public delegate Real MatrixElementFunction( int i, int j );

	/// <summary>
	/// Maps a Real x to resultant Real y
	/// </summary>
	/// <param name="x">Input Param</param>
	/// <returns>A real value</returns>
	public delegate Real RealFunction( Real x );

	/// <summary>
	/// A function that produces side effects
	/// </summary>
	/// <param name="x">takes a coord and produces changes somewhere</param>
	public delegate void MatrixElementProcedure( int i, int j );

	/// <summary>
	/// Takes in a Real and produces side effects
	/// </summary>	
	public delegate void RealProcedure( Real x );

	/// <summary>
	/// Takes any number of matrices and returns a new matrix
	/// </summary>
	/// <param name="matrices">The input matrices</param>
	/// <returns>The resultant Matrix</returns>
	public delegate Matrix MatrixFunction( params Matrix[] matrices );
}